import 'package:get/get.dart';
import 'package:getx_tutorial/app/data/providers/news_provider.dart';
import 'package:getx_tutorial/app/modules/home/home_controller.dart';
import 'package:getx_tutorial/app/modules/home/news_repository.dart';

class HomeBinding implements Bindings {
  @override
  void dependencies() {
    Get.lazyPut<INewsProvider>(() => NewsProvider());
    Get.lazyPut<INewsRepository>(() => NewsRepository(provider: Get.find()));
    Get.lazyPut(() => HomeController(repository: Get.find()));

    // Get.put<INewsProvider>(NewsProvider());
    // Get.put<INewsRepository>(NewsRepository(provider: Get.find()));
    // Get.put(HomeController(repository: Get.find()));
  }
}
